package model

import "gorm.io/gorm"

type UserInfo struct {
	Id       string `gorm:"type:char(36);" db:"id" json:"id"`
	Account  string `gorm:"type:varchar(125);" db:"account" json:"account"`
	NikeName string `gorm:"type:varchar(125);" db:"nikename" json:"nikename"`
	Email    string `gorm:"type:varchar(125);" db:"email" json:"email"`
	Gender   string `gorm:"type:varchar(4);" db:"gender" json:"gender"`
	Password string `gorm:"type:varchar(256);" db:"password" json:"password"`
	Phone    string `gorm:"type:varchar(125);" db:"phone" json:"phone"`
}

type UserGoods struct {
	gorm.Model
	GoodsName  string   `gorm:"type:varchar(125);" json:"goodsName"`
	UserInfoID string   `gorm:"type:char(36);" json:"userInfoId"`
	UserInfo   UserInfo `json:"-"`
}

type UserVlog struct {
	gorm.Model
	Title      string   `gorm:"type:varchar(254);" json:"title"`
	Content    string   `json:"content"`
	UserInfoID string   `gorm:"type:char(36);" json:"userInfoId"`
	UserInfo   UserInfo `json:"-"`
}
